package mr.ali.webvideo.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import mr.ali.webvideo.model.CollectionImg;
import mr.ali.webvideo.mapper.CollectionImgMapper;
import mr.ali.webvideo.service.ICollectionImgService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Mr-ali
 * @since 2025-08-16
 */
@Service
public class CollectionImgServiceImpl extends ServiceImpl<CollectionImgMapper, CollectionImg> implements ICollectionImgService {

    @Resource
    private CollectionImgMapper collectionImgMapper;

    @Override
    public List<CollectionImg> findByIdAll(Integer videoId){
        // 创建查询条件包装器
        QueryWrapper<CollectionImg> wrapper = new QueryWrapper<>();
        wrapper.eq("video_id", videoId);
        // 根据查询条件获取视频列表
        List<CollectionImg> videoList = collectionImgMapper.selectList(wrapper);
        return videoList;
    }


}
